#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 
# Copyright (c) 2017 Baidu.com, Inc. All Rights Reserved
# 

"""
File: add_dummy_label.py
Author: zhangyang(zhangyang40@baidu.com)
Date: 2017/10/12 下午1:49
"""
import argparse
import csv

parser = argparse.ArgumentParser(description='process some integers')
parser.add_argument('csv_path', type=str, nargs=1, help='set path to the csv file')
parser.add_argument('out_path', type=str, nargs=1, help='set path to the svm file')
args = parser.parse_args()

CSV_PATH, OUT_PATH = args.csv_path[0], args.out_path[0]

f = csv.writer(open(OUT_PATH, 'w'))
for i, row in enumerate(csv.reader(open(CSV_PATH))):
    if i == 0:
        row.insert(1, 'click')
    else:
        row.insert(1, '0')
    f.writerow(row)
